Timm Bäder [Tue, 21 May 2019 12:26:19 +0000 (14:26 +0200)]
icontheme: Optimize icon_name_is_symbolic
We call this function *a lot* it's doing lots of unnecessary work inside
g_str_has_suffix. Get the icon name length only once instead and
open-code the suffix check.
Timm Bäder [Tue, 21 May 2019 09:07:23 +0000 (11:07 +0200)]
gtkicontheme: Avoid a get_icon_flags call
We're only using the value of the first call at all if
symbolic_suffix & ICON_SUFFIX_PNG is FALSE.
Timm Bäder [Thu, 29 Aug 2019 14:40:41 +0000 (16:40 +0200)]
icontheme: Remove outdated comment
It's not called css_fg anymore and it can't possibly be NULL since we
make sure before passing it here.
Timm Bäder [Wed, 28 Aug 2019 12:24:50 +0000 (14:24 +0200)]
widget: Queue an allocate on native widgets when changing opacity
This way the opacity change works on toplevel windows on wayland.
Timm Bäder [Wed, 28 Aug 2019 11:52:16 +0000 (13:52 +0200)]
inspect-button: Inline deemphasize_window() into only caller
Timm Bäder [Wed, 28 Aug 2019 10:25:55 +0000 (12:25 +0200)]
inspect-button: Inline some functions into only caller
Make them clearer for later commits.
Timm Bäder [Wed, 28 Aug 2019 09:50:59 +0000 (11:50 +0200)]
filechooserwidget: Properly watch for different display
The value returned by gtk_widget_get_settings() depends on the widget's
display, so watch for notify::display instead of using (un)root for
this.
Fixes the warnings seen when show a file chooser from the inspector.
Timm Bäder [Wed, 28 Aug 2019 08:05:48 +0000 (10:05 +0200)]
glarea: Fix buffer initialization
This only worked when the vao id and the buffer id accidentally matched,
for example when running gtk4-demo with --run=glarea
Fixes #2042
Timm Bäder [Wed, 28 Aug 2019 07:26:29 +0000 (09:26 +0200)]
box: Don't do casts before preconditions
Timm Bäder [Wed, 28 Aug 2019 06:13:18 +0000 (08:13 +0200)]
infobar: Inherit from GtkContainer
infobars being a GtkBox doesn't make sense.
Also implement infobars without exposing internal children.
Closes #1957 because it adds the bottom border.
Timm Bäder [Tue, 27 Aug 2019 08:05:51 +0000 (10:05 +0200)]
text: Fix a crash when retrieving the selected text
Timm Bäder [Tue, 27 Aug 2019 07:33:54 +0000 (09:33 +0200)]
textview: Remove useless warning
The output doesn't make sense anymore and it breaks cursor blinking when
moving the focus back into the textview.
Timm Bäder [Mon, 26 Aug 2019 17:34:52 +0000 (19:34 +0200)]
layoutoverlay: Fix everything
This code is better because:
1) The coordinates translations are actually correct and not sometimes
wrong like before
2) We clip widgets that have overflow set
3) We honor the widget's transform
4) It is less code
Timm Bäder [Mon, 26 Aug 2019 16:58:42 +0000 (18:58 +0200)]
scale: Allocate value close to slider
The scale might be allocated at a height greater than requested, and in
that case y=0 is just too far away. Allocate the value directly next to
the slider instead.
Timm Bäder [Mon, 26 Aug 2019 16:56:04 +0000 (18:56 +0200)]
scale: Use top/left/bottom/right style classes on value label
Just top/bottom is not enough anymore.
77769a52b3cc0b836b226457963d7b5fe92ee115 broke e.g. horizontal scales
with the value on top/bottom, adding too much space.
Timm Bäder [Mon, 26 Aug 2019 16:23:31 +0000 (18:23 +0200)]
gl renderer: Remove unused matrix
Timm Bäder [Sun, 25 Aug 2019 13:02:57 +0000 (15:02 +0200)]
fixed: Documentation clarifications
Timm Bäder [Sun, 25 Aug 2019 12:59:01 +0000 (14:59 +0200)]
fixed: x/y passed to get_child_position are not optional
Timm Bäder [Sun, 25 Aug 2019 12:56:13 +0000 (14:56 +0200)]
fixedlayout: Don't call the child transform position
It's a full transform and not just a translation these days.
Timm Bäder [Sun, 25 Aug 2019 12:30:33 +0000 (14:30 +0200)]
linkbutton: Use widget API to set has-toolip
As God intended.
Timm Bäder [Sun, 25 Aug 2019 12:22:46 +0000 (14:22 +0200)]
linkbutton: Use proper action name for right-click menu
Timm Bäder [Sun, 25 Aug 2019 12:15:12 +0000 (14:15 +0200)]
menubutton: Control sensitivity of child button
Instead of the menubutton itself.
Timm Bäder [Sun, 25 Aug 2019 08:18:04 +0000 (10:18 +0200)]
magnifier: Remove some unused members
Timm Bäder [Sun, 25 Aug 2019 06:33:59 +0000 (08:33 +0200)]
docs: Remove styles.txt
The information is all wrong and superseded by the css docs
Timm Bäder [Sun, 25 Aug 2019 06:28:06 +0000 (08:28 +0200)]
docs: Remove widget_system.txt
Almost all information in here is incorrect or outdated, most of it is
still from gtk2 and GtkObject days.
Timm Bäder [Sun, 25 Aug 2019 06:18:10 +0000 (08:18 +0200)]
docs: Remove widget_geometry.txt
The information in that file is all outdated.
Timm Bäder [Sun, 25 Aug 2019 06:07:44 +0000 (08:07 +0200)]
widget: Clear up gtk_widget_class_install_property_action docs
Timm Bäder [Sun, 25 Aug 2019 05:55:46 +0000 (07:55 +0200)]
widget: Remove reference to non-existent function
gtk_widget_class_install_stateful_action() does not exist.
Timm Bäder [Sun, 25 Aug 2019 05:52:42 +0000 (07:52 +0200)]
widget: Add some missing annotations to gtk_widget_class_query_action
Timm Bäder [Sat, 24 Aug 2019 15:45:01 +0000 (17:45 +0200)]
window: Remove useless deprecation guards
gtk_window_present() is not deprecated.
Timm Bäder [Sat, 24 Aug 2019 08:39:28 +0000 (10:39 +0200)]
cssprovider: Remove unused member from GtkCssScanner
Timm Bäder [Sat, 24 Aug 2019 08:35:53 +0000 (10:35 +0200)]
cssprovider: Don't lookup on empty css providers
This should not have a huge performance impact, but debugging is easier
if we don't lookup in empty css providers.
Timm Bäder [Sat, 24 Aug 2019 08:09:41 +0000 (10:09 +0200)]
cssnode: GtkCssAnimatedStyle->style is always a static style
Timm Bäder [Sat, 24 Aug 2019 07:11:15 +0000 (09:11 +0200)]
gtksettings: Remove unused functions & prototypes
Timm Bäder [Sat, 24 Aug 2019 06:49:24 +0000 (08:49 +0200)]
cssnode: Remove unused struct
Timm Bäder [Sat, 24 Aug 2019 05:24:49 +0000 (07:24 +0200)]
cssstyle: Remove unused _add_difference
Timm Bäder [Fri, 23 Aug 2019 15:14:40 +0000 (17:14 +0200)]
stylecontext: Remove leftover function prototypes
Timm Bäder [Fri, 23 Aug 2019 15:09:54 +0000 (17:09 +0200)]
stylecontext: Stop exporting _resolve_color
Only used in gtkstylecontext.c
Timm Bäder [Fri, 23 Aug 2019 07:07:29 +0000 (09:07 +0200)]
csscolorvalue: return the initial color value directly
Timm Bäder [Fri, 23 Aug 2019 06:15:42 +0000 (08:15 +0200)]
csscolorvalue: Remove unused new_from_rgba()
Timm Bäder [Thu, 22 Aug 2019 17:25:22 +0000 (19:25 +0200)]
cssstaticstyle: Compute initial/inherit values directly
Timm Bäder [Thu, 22 Aug 2019 17:24:17 +0000 (19:24 +0200)]
cssinitialvalue: Make _compute public
So we can use it in cases where the class of css value is known to be an
initial one.
Timm Bäder [Thu, 22 Aug 2019 16:08:51 +0000 (18:08 +0200)]
csslookup: Remove 'relevant' parameter from _init
Unused.
Timm Bäder [Thu, 22 Aug 2019 16:00:37 +0000 (18:00 +0200)]
csslookup: Remove 'missing' bitmask
It's almost never useful to have a bitmask here, since it's only used
for the intersection case in gtk_css_style_provider_lookup. However,
even if that returns true, we still need to check every single style
property for being set again in the look afterwards.
Just remove the bitmask.
Timm Bäder [Thu, 22 Aug 2019 11:14:57 +0000 (13:14 +0200)]
cssanimatedstyle: Keep transition_info_add from recursing
The slowest part of that fuction is the type check for
GtkCssShorthandProperty. Subproperties of shorthand properties never
refer to more shorthand properties however, so we don't want to have the
type check for those.
Timm Bäder [Thu, 22 Aug 2019 10:54:36 +0000 (12:54 +0200)]
csslookup: Remove tautological if expression
A value is always either set or missing.
This was changed in
a1f7c459b75fe47e2abb7e856e6d4a4ad5208cb9, which
removed the ability for partial style computation.
Timm Bäder [Thu, 22 Aug 2019 10:14:33 +0000 (12:14 +0200)]
cssstaticstyle: Avoid ref'ing specified value in compute_value
There are alerady _get functions for GtkCssInheritValue and
GtkCssInitialValue, so use those. We can avoid a ref+unref pair this
way.
Timm Bäder [Wed, 21 Aug 2019 09:19:35 +0000 (11:19 +0200)]
cssprovider: Fix compilation wth VERIFY_TREE set
Timm Bäder [Wed, 21 Aug 2019 09:18:22 +0000 (11:18 +0200)]
cssmatcher: Inline node values into matcher
So we don't have to go through the matcher->node->decl every time
Timm Bäder [Mon, 19 Aug 2019 09:06:04 +0000 (11:06 +0200)]
cssanimatedstyle: Make set_animated_value transfer-full
Timm Bäder [Mon, 19 Aug 2019 08:56:19 +0000 (10:56 +0200)]
cssimage: Use gtk_internal_return_val_*
GtkCssImage is not public and being used in hot paths, e.g. CSS.
Timm Bäder [Mon, 19 Aug 2019 08:54:09 +0000 (10:54 +0200)]
gtkprivate: Only define gtk_internal_return_if* for consistency checks
The wanted behavior here is that these are only defined if the buildtype
is debug, i.e. full debugging.
Timm Bäder [Mon, 19 Aug 2019 07:42:51 +0000 (09:42 +0200)]
cssanimatedstyle: Save animation in array
Timm Bäder [Mon, 19 Aug 2019 06:46:27 +0000 (08:46 +0200)]
cssanimatedstyle: Avoid type check in loop
We can just do the check once as source is not going to change within
the loop.
Timm Bäder [Mon, 19 Aug 2019 06:45:07 +0000 (08:45 +0200)]
cssanimatedstyle: Avoid unnecessary transition work
No need to do all the transition work if the transition duration will be
0 for all of them.
Timm Bäder [Fri, 23 Aug 2019 06:14:54 +0000 (08:14 +0200)]
cssrgbavalue: Add & use new_white()
Timm Bäder [Fri, 23 Aug 2019 06:13:20 +0000 (08:13 +0200)]
cssrgbavalue: Add an opaque white singleton
Used a few hundred times in the widget-factory.
Timm Bäder [Sat, 17 Aug 2019 17:53:32 +0000 (19:53 +0200)]
cssrgbavalue: Add a singleton for transparent colors
The most common background color is no background color.
Timm Bäder [Sat, 17 Aug 2019 17:29:44 +0000 (19:29 +0200)]
cssdimensionvalue: Create a few more common singletons
Timm Bäder [Sat, 17 Aug 2019 17:08:16 +0000 (19:08 +0200)]
cssstaticstyle: Make set_value (transfer-full)
We only call this in one place and we can avoid a ref + unref pair this
way.
Timm Bäder [Sat, 17 Aug 2019 16:55:35 +0000 (18:55 +0200)]
css: Avoid more type checks in hot paths
Timm Bäder [Sat, 17 Aug 2019 16:23:36 +0000 (18:23 +0200)]
csspalettevalue: Use simple arrays instead of a hashtable
Use two sorted name/value arrays to save the colors instead of a
hashtable. This makes palette values faster to compare etc.
Timm Bäder [Sat, 17 Aug 2019 14:12:57 +0000 (16:12 +0200)]
cssanimatedstyle: Remove some casts in hot paths
gtk_css_animated_style_create_css_transitions down from 16% to 11%
when repeatedly clicking on a spinbutton button in the widget factory.
Timm Bäder [Thu, 22 Aug 2019 15:16:21 +0000 (17:16 +0200)]
bitmask: Add _gtk_allocated_bitmask_to_string
Timm Bäder [Fri, 23 Aug 2019 07:40:29 +0000 (09:40 +0200)]
Adwaita: Hack around list button styling
Once again.
Timm Bäder [Fri, 23 Aug 2019 07:40:02 +0000 (09:40 +0200)]
widget-factory: Add a spinbutton in a list
Timm Bäder [Fri, 23 Aug 2019 07:32:00 +0000 (09:32 +0200)]
spinbutton: Use a box layout
Timm Bäder [Thu, 22 Aug 2019 07:06:43 +0000 (09:06 +0200)]
menubutton: Add a create_popup_func
Some use cases require a menu button to create the popup on demand.
Timm Bäder [Thu, 22 Aug 2019 06:04:24 +0000 (08:04 +0200)]
menubutton: Remove unused member
Timm Bäder [Thu, 22 Aug 2019 10:41:39 +0000 (12:41 +0200)]
label: Remove "line" from wrap properties
The property names are "wrap" and "wrap-mode", so it doesn't make sense
that the accessors refer to line_wrap and line_wrap_mode.
Timm Bäder [Wed, 21 Aug 2019 08:56:20 +0000 (10:56 +0200)]
gsktransform: Fix documentation comment
There is no @m.
Timm Bäder [Fri, 16 Aug 2019 05:17:41 +0000 (07:17 +0200)]
snapshot: Stop exporting _append_node_internal
Unused outside of gtksnapshot.c
Timm Bäder [Sun, 8 Sep 2019 07:40:55 +0000 (07:40 +0000)]
Merge branch 'wip/chergert/remove-emit-by-name' into 'master'
texttag: avoid use of g_signal_emit_by_name()
See merge request GNOME/gtk!1088
Piotr Drąg [Sat, 7 Sep 2019 11:29:47 +0000 (13:29 +0200)]
Update POTFILES.skip
Marek Černocký [Sat, 7 Sep 2019 10:10:12 +0000 (12:10 +0200)]
Updated Czech translation
Emin Tufan Çetin [Fri, 6 Sep 2019 18:50:05 +0000 (18:50 +0000)]
Update Turkish translation
Christian Hergert [Thu, 5 Sep 2019 02:39:24 +0000 (19:39 -0700)]
texttag: avoid use of g_signal_emit_by_name()
This avoids looking up the signal by name and instead uses the saved
signal identifier from gtktexttagtable.c
Matthias Clasen [Wed, 4 Sep 2019 17:02:06 +0000 (17:02 +0000)]
Merge branch 'wip/chergert/faster-comparison' into 'master'
textlayout: remove use of GtkTextIter in line comparison
See merge request GNOME/gtk!1087
Christian Hergert [Wed, 4 Sep 2019 16:12:54 +0000 (09:12 -0700)]
textlayout: remove use of GtkTextIter in line comparison
We do not need to create a GtkTextIter to perform the comparison here as
that will require a number of validation steps that are extra work
compared to just discovering the GtkTextLine number directly.
Matthias Clasen [Tue, 3 Sep 2019 14:38:30 +0000 (14:38 +0000)]
Merge branch 'gtk-4-issue2128' into 'master'
[gtk4] wayland: Fix xdg-output v3 support
See merge request GNOME/gtk!1082
Olivier Fourdan [Tue, 3 Sep 2019 13:59:18 +0000 (15:59 +0200)]
wayland: Fix xdg-output v3 support
The xdg_output.done event is deprecated in xdg-output v3, so clients
need to rely on the wl_output.done event instead.
However, applying the changes on the fist wl_output.event when using
xdg-output v3 may lead to an incomplete change, as following xdg-output
updates may follow.
Make sure we apply xdg-output events on wl_output.done events with
xdg-output v3.
https://gitlab.gnome.org/GNOME/gtk/issues/2128
Jordi Mas [Sun, 1 Sep 2019 06:28:18 +0000 (08:28 +0200)]
Update Catalan translation
Ryuta Fujii [Sat, 31 Aug 2019 13:45:30 +0000 (13:45 +0000)]
Update Japanese translation
Ryuta Fujii [Sat, 31 Aug 2019 12:31:35 +0000 (12:31 +0000)]
Update Japanese translation
Ryuta Fujii [Sat, 31 Aug 2019 12:27:01 +0000 (12:27 +0000)]
Update Japanese translation
Changwoo Ryu [Fri, 30 Aug 2019 14:10:45 +0000 (14:10 +0000)]
Update Korean translation
Timm Bäder [Thu, 29 Aug 2019 13:56:13 +0000 (13:56 +0000)]
Merge branch 'typo' into 'master'
popover: fix typo in schema string
See merge request GNOME/gtk!1071
Alexandre Franke [Thu, 29 Aug 2019 12:53:34 +0000 (12:53 +0000)]
Update French translation
Alexandre Franke [Thu, 29 Aug 2019 12:50:20 +0000 (14:50 +0200)]
popover: fix typo in schema string
Ask Hjorth Larsen [Thu, 29 Aug 2019 10:37:41 +0000 (12:37 +0200)]
Updated Danish translation of gtk-properties
Ask Hjorth Larsen [Thu, 29 Aug 2019 10:37:41 +0000 (12:37 +0200)]
Updated Danish translation of gtk
Jordi Mas [Wed, 28 Aug 2019 17:37:59 +0000 (19:37 +0200)]
Update Catalan translation
Benjamin Otte [Mon, 26 Aug 2019 17:00:34 +0000 (17:00 +0000)]
Merge branch 'wip/ricotz/issue2107' into 'master'
gsk: Add missing 'transfer full' annotations of instance parameters
Closes #2107
See merge request GNOME/gtk!1065
Rico Tzschichholz [Mon, 26 Aug 2019 13:24:29 +0000 (15:24 +0200)]
gsk: Add missing 'transfer full' annotations of instance parameters
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2107
Matthias Clasen [Mon, 26 Aug 2019 13:50:43 +0000 (13:50 +0000)]
Merge branch 'office-runner-crash' into 'master'
Fix a crash in gtk-builder-tool
See merge request GNOME/gtk!1064
Matthias Clasen [Mon, 26 Aug 2019 13:34:15 +0000 (15:34 +0200)]
Fix a crash in gtk-builder-tool
Crash pointed out by Bastien Nocera.
Testcase included.
Changwoo Ryu [Mon, 26 Aug 2019 11:20:16 +0000 (11:20 +0000)]
Update Korean translation
Timm Bäder [Mon, 26 Aug 2019 09:18:47 +0000 (09:18 +0000)]
Merge branch 'doc-typos' into 'master'
Minor typos in the Documentation (a/an)
See merge request GNOME/gtk!1061
Дилян Палаузов [Sun, 25 Aug 2019 12:52:24 +0000 (12:52 +0000)]
Minor typos in the Documentation (a/an)
Matthias Clasen [Sun, 25 Aug 2019 11:58:02 +0000 (11:58 +0000)]
Merge branch 'gdkmonitor-x11-manufacturer' into 'master'
gdk: x11: Fill GdkMonitor manufacturer with PNP id from EDID
Closes #1765
See merge request GNOME/gtk!859